package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 组织机构表 实体类
 * 表名：sys_depart
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "sys_depart")
public class SysDepart implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * ID
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false, length = 32)
    private String id;
    
    /**
     * 父机构ID
     */
    @Column(name = "parent_id", length = 32)
    private String parentId;
    
    /**
     * 机构/部门名称
     */
    @Column(name = "depart_name", nullable = false, length = 100)
    private String departName;
    
    /**
     * 英文名
     */
    @Column(name = "depart_name_en", length = 500)
    private String departNameEn;
    
    /**
     * 缩写
     */
    @Column(name = "depart_name_abbr", length = 500)
    private String departNameAbbr;
    
    /**
     * 排序
     * 默认值: 0
     */
    @Column(name = "depart_order")
    private Integer departOrder;
    
    /**
     * 描述
     */
    @Column(name = "description", length = 500)
    private String description;
    
    /**
     * 机构类别 1公司，2组织机构，2岗位
     * 默认值: 1
     */
    @Column(name = "org_category", nullable = false, length = 10)
    private String orgCategory;
    
    /**
     * 机构类型 1一级部门 2子部门
     */
    @Column(name = "org_type", length = 10)
    private String orgType;
    
    /**
     * 机构编码
     */
    @Column(name = "org_code", nullable = false, length = 64)
    private String orgCode;
    
    /**
     * 手机号
     */
    @Column(name = "mobile", length = 32)
    private String mobile;
    
    /**
     * 传真
     */
    @Column(name = "fax", length = 32)
    private String fax;
    
    /**
     * 地址
     */
    @Column(name = "address", length = 100)
    private String address;
    
    /**
     * 备注
     */
    @Column(name = "memo", length = 500)
    private String memo;
    
    /**
     * 租户主键
     */
    @Column(name = "tenant_id")
    private Integer tenantId;
    
    /**
     * 状态（1启用，0不启用）
     */
    @Column(name = "status", length = 1)
    private String status;
    
    /**
     * 删除状态（0，正常，1已删除）
     */
    @Column(name = "del_flag", length = 1)
    private String delFlag;
    
    /**
     * 创建人
     */
    @Column(name = "create_by", length = 32)
    private String createBy;
    
    /**
     * 创建日期
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新人
     */
    @Column(name = "update_by", length = 32)
    private String updateBy;
    
    /**
     * 更新日期
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    @Override
    public String toString() {
        return "SysDepart{" +
            "id=" + id +
            ", parentId=" + parentId +
            ", departName=" + departName +
            ", departNameEn=" + departNameEn +
            ", departNameAbbr=" + departNameAbbr +
            ", departOrder=" + departOrder +
            ", description=" + description +
            ", orgCategory=" + orgCategory +
            ", orgType=" + orgType +
            ", orgCode=" + orgCode +
            ", mobile=" + mobile +
            ", fax=" + fax +
            ", address=" + address +
            ", memo=" + memo +
            ", tenantId=" + tenantId +
            ", status=" + status +
            ", delFlag=" + delFlag +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
        '}';
    }
} 